<ui:composition template="../templates/template.xhtml" xmlns="http://www.w3.org/1999/xhtml"  xmlns:f="http://java.sun.com/jsf/core" 
xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:ui="http://java.sun.com/jsf/facelets">

	<!-- Page title -->
	<ui:define name="title">${msg.user_log_in_title}</ui:define>
	
	<!-- Page content -->
	<ui:define name="content">
	
		<!-- Breadcrumb -->
		<h:form id="logInBreadcrumbForm">
			<p:breadCrumb styleClass="breadcrumb">
				<p:menuitem title="${msg.user_log_in_breadcrumb_home}" url="#{navigationBean.accessHomePage}" />
				<p:menuitem disabled="true" styleClass="userCategoryColor" value="#{msg.user_log_in_breadcrumb_log_in}"/>
			</p:breadCrumb>
		</h:form>
		
		<!-- Log in form -->
		<h:form id="logInForm" prependId="false">
			<p:fieldset id="logInFieldset" styleClass="fieldset userFieldset userCategoryBorderColor">
			
				<f:facet name="legend">
					<span class="userCategoryColor">${msg.user_log_in_log_in_to_your_account}</span>
				</f:facet>
			
				<!-- Error messages -->
				<ui:include src="../components/facesMessages.xhtml">
					<ui:param name="messageContent" value="${msg.user_log_in_bad_credentials}" />
					<ui:param name="messageType" value="error" />
					<ui:param name="rendered" value="#{null != param['error'] and param['error']=='true'}" />
				</ui:include>
				
				<div class="formTable"> <!-- Form -->
					<div class="formRow">
						<span class="formCell formLabelCell">
							<label class="required" for="j_username">${msg.user_log_in_form_email}</label>
						</span>
						<span class="formCell">
							<p:inputText id="j_username" required="true" />
						</span>
					</div>
					<div class="formRow">
						<span class="formCell formLabelCell">
							<label class="required" for="j_password">${msg.user_log_in_form_password}</label>
						</span>
						<span class="formCell">
							<p:password id="j_password" required="true" />
						</span>
					</div>
				</div>
				
				<div class="formButtonsLine userFormButtonsLine">
					<p:commandButton ajax="false" icon="userCategoryIconSprite ui-icon-circle-check" id="logInSubmitButton"  styleClass="userCategoryBackground"
						onclick="document.#{p:component('logInForm')}.action='/cheliou/j_spring_security_check';logInFormBlockUI.show();" oncomplete="logInFormBlockUI.hide();" 
						update="@form" value="${msg.user_log_in_form_button_connect}" />
				</div>
					
			</p:fieldset>
			
			<ui:include src="../components/blockUI.xhtml">
				<ui:param name="block" value="logInFieldset" />
				<ui:param name="trigger" value="logInSubmitButton" />
				<ui:param name="widgetVar" value="logInFormBlockUI" />
			</ui:include>
			
		</h:form>
	
	</ui:define>

</ui:composition>